<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css/base.css">
    <link rel="stylesheet" href="./css/media.css">
    <link rel="stylesheet" type="text/css" href="./css/iconfont.css">
    <link rel="stylesheet" href="./css/five.css">
    <title>白菜价</title>
</head>

<body>
    <div class="header">
        <div class="iconfont  icon-xiazai6"></div>
        <div class="zx-h-title">白菜价-淘宝内部券</div>
        <div class="iconfont icon-xiazai">
            <p>下载APP</p>
        </div>
    </div>
    <div class="nav swiper-container">
        <ul class="ul-bcj swiper-wrapper clearfix">
            <!-- <li class="active">全部</li>
            <li>热销</li>
            <li>9块邮</li>
            <li>19块邮</li>
            <li>数码家电</li>
            <li>居家</li>
            <li>美食</li>
            <li>男装</li>
            <li>女装</li>
            <li>鞋包配饰</li>
            <li>文体</li>
            <li>母婴</li>
            <li>美妆</li> -->
        </ul>
    </div>
    <div class="head">
        <!-- <div class="productImg">
            <a href="#"><img src="" alt=""></a>
        </div>
        <div class="h-right"> -->
            <!-- <div class="productName"><span>[包邮]</span>藏源鹿品牌原创设计【羊毛针织】中长大衣</div>
            <div class="productPrice"><span>券后</span><span>¥</span>106.0<del>¥206</del></div>
            <div class="productCouponRemain">
                <div class="jdt"><span class="orange" style="width: 75%;"><span></span>75%</span>
                </div> 已领75117张</div>
            <span class="productCoupon"><a href="#">点此领10元优惠券</a></span>
            <span class="productHref"><a href="#">下单链接</a></span> -->
        <!-- </div> -->
    </div>
    <footer>
        <!-- 底部工具栏 -->
        <div class="footer-tools">
          <a href="javascript:;">登录</a>
          <a href="javascript:;">注册</a>
          <a href="javascript:;">返回顶部</a>
        </div>
        <!-- 版权信息 -->
        <div class="footer-copyright">
          <p>
            <a href="javascript:;">手机APP下载</a>
            慢慢买手机版 
            <span>-- 掌上比价平台</span>
          </p>
          <p>m.manmanbuy.com</p>
        </div>
      </footer>    
</body>

</html>
<script src="./js/template.js"></script>
<script src="./js/jquery.min.js"></script>
<script src="./js/iscroll.js"></script>
<script src="./js/itcastEvent.js"></script>
<!-- <script src="./js/zepto.js"></script> -->
<script src="./js/utils.js"></script>
<script src="./js/swiper.js"></script>
<!-- 导航栏 -->
<script type="text/template" id="usersListTmp">
    {{each result as val key}}
    <li><a href="./index.html?titleId={{val.titleId}}">{{val.title}}</a></li>
    {{/each}}
</script>
<script>
    $.ajax({
        type: 'get', //  请求的类型
        url: 'http://193.112.55.79:9090/api/getbaicaijiatitle', // 请求的目标地址
        dataType: 'json', // 数据回来之后解析成的类型
        success: function(res) {
            console.log(res);
            //     // 准备模板字符串
            template.config("escape", false);
            var htmlStr = template('usersListTmp', res);
            //     // 动态渲染数据
            $('.ul-bcj').html(htmlStr);
        }
    })
</script>

<!-- 主页面 -->
<script type="text/template" id="usersListTmpzhuye">
    {{each result as val key}}
    <div class="productImg">
        <a href="#">{{val.productImg}}</a>
    </div>
    <div class="h-right">
        <div class="productName">{{val.productName}}</div>
        <div class="productPrice">{{val.productPrice}}</div>
        <div class="productCouponRemain">
            {{val.productCouponRemain}}
        </div>
        <span class="productCoupon">{{val.productCoupon}}</span>
        <span class="productHref">{{val.productHref}}</span>
    </div>
    {{/each}}
</script>
<script>
    var dataId = URLHandle.parameter(location.search).titleId;
    // console.log(dataId);
    $.ajax({
        type: 'get', //  请求的类型
        url: 'http://193.112.55.79:9090/api/getbaicaijiaproduct', // 请求的目标地址
        data: {
            titleid: dataId
        },
        dataType: 'jsonp',
        // 数据回来之后解析成的类型
        success: function(res) {
            // console.log(res);
            //     // 准备模板字符串
            template.config("escape", false);
            var htmlStr = template('usersListTmpzhuye', res);
            // console.log(htmlStr);
            //     // 动态渲染数据
            $('.head').html(htmlStr);
        }
    })
</script>

<script>
   var top_scroll = new IScroll(".nav", {
            eventPassthrough: true,
            scrollX: true,
            scrollY: false,
            preventDefault: false
    });
</script>